import { ApiCall } from "tsrpc";
import { roomServer } from "../..";
import { ReqGetRoomList, ResGetRoomList } from "../../shared/protocols/room/PtlGetRoomList";

export async function ApiGetRoomList(call: ApiCall<ReqGetRoomList, ResGetRoomList>) {
    call.succ({
        roomInfos: roomServer.rooms.map(item => item.state)
    })
}